package com.chenhao.springcloud.chenhaodesignservice.pattern.decorator;

/**
 * Description: 创建扩展了 ShapeDecorator 类的实体装饰类。
 *
 * @author chenhao
 * @date 2020/6/3 13:48
 */
public class RedShapeDecorator extends ShapeDecorator {

    public RedShapeDecorator(Shape decoratorShape) {
        super(decoratorShape);
    }

    @Override
    public void draw() {
        decoratorShape.draw();
        setRedBorder(decoratorShape);
    }

    private void setRedBorder(Shape decoratorShape) {
        System.out.println("Border Color: Red");
    }
}
